<template>
  <tk-container>
    <tkui-header center>
      <tkui-button class="icon small" slot="left-menu" @click.native = '$router.go(-1)'>
        <tk-icon>return</tk-icon>
      </tkui-button>
      找回密码
    </tkui-header>
    <div class="body">
      <my-input label = '车牌号' placeholder = '请输入注册车牌号' v-model = 'plateNumber'></my-input>
      <my-input label = '密码' placeholder = '请输入新密码' type = 'password' v-model = 'newPassword'></my-input>
      <my-input label = '密码' placeholder = '再次输入新密码' type = 'password' v-model = 'oldPassword'></my-input>
      <tkui-button class="block raised btn" :class = '[verify ? "primary" : "disable"]' @click.native = 'retrieval'>立即注册</tkui-button>
    </div>
  </tk-container>
</template>
<script>
  import myInput from 'components/input'
  export default {
    data () {
      return {
        plateNumber: '',
        newPassword: '',
        oldPassword: ''
      }
    },
    computed: {
      verify () {
        return this.plateNumber && this.newPassword && this.newPassword === this.oldPassword
      }
    },
    methods: {
      retrieval () {
        if (!this.verify) return false
      }
    },
    components: {
      myInput
    }
  }
</script>
<style lang="scss" scoped>
  @import '../assets/scss/main';
  .body{
    padding: 0 $gutter;
    .btn{
      margin-top:30px;
    }
  }
</style>
